package com.wxy.service.impl;

import com.wxy.mapper.UserMapper;
import com.wxy.pojo.User;
import com.wxy.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author zzzzz
 * @create 09-11
 */

@Service
public class UserServiceImpl implements UserService {

    @Resource
    UserMapper userMapper;


    @Override
    public User selectUserInfo(User user) {
        return userMapper.selectByUsernameAndPwd(user);
    }

    @Override
    public User selectUserInfoByname(String username) {
        return userMapper.selectByUsername(username);
    }

    @Override
    public int insertUserInfo(User user) {
        return userMapper.insertSelective(user);
    }
}
